/**
 * <p>
 * Created on 2006-5-1 0:00:54 <br>
 * Copyright (c) 2006, All rights reserved.
 * </p>
 * @author Widen
 */
package com.widen.prima;

import org.hibernate.dialect.HSQLDialect;

public class HypersonicSQL18Dialect
    extends HSQLDialect
{
    public String[] getCreateSequenceStrings(String sequenceName)
    {
        return new String[] {
            "create table information_schema." + sequenceName
                + " (zero integer)",
            "insert into information_schema." + sequenceName + " values (0)",
            "create sequence " + sequenceName + " start with 1" };
    }

    public String[] getDropSequenceStrings(String sequenceName)
    {
        return new String[] {
            "drop table information_schema." + sequenceName + " if exists",
            "drop sequence " + sequenceName };
    }

    public String getSequenceNextValString(String sequenceName)
    {
        return "select next value for " + sequenceName
            + " from information_schema." + sequenceName;
    }

    public String getQuerySequencesString()
    {
        return "select sequence_name from information_schema.system_sequences";
    }
}
